package com.zjut.multithreading.controller;

import com.zjut.multithreading.tool.QuartzManager;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Component;

@Component
@Import(QuartzManager.class)
public class TotalPushJob {

    @Autowired
    QuartzManager quartzManager;

    public void PingTJob() throws SchedulerException {
//        quartzManager.getScheduler().clear();
        String corn = "0/30 * * * * ?";
        quartzManager.addJob("PingJob","PingJob","PingJob","PingJob", PingJob.class, corn, "");
    }
}
